<div class="centercontent tables">
<div class="pageheader notab">
<h1 class="pagetitle">Modul Agenda</h1>
<span class="pagedesc">Digunakan untuk mengelola agenda, mengelola anggota tim dan peminjaman barang yang digunakan.</span> </div>
<!--pageheader-->
<div id="contentwrapper" class="contentwrapper"><br />
<div class="contenttitle2">
<h3>Daftar Agenda</h3>
</div>
<!--contenttitle-->
<?php if($agenda->num_rows() > 0){?>
<table class="stdtable" id="dyntable" border="0" cellpadding="0" cellspacing="0">
<colgroup><col class="con0" /><col class="con1" /><col class="con0" /><col class="con1" /><col class="con0" /></colgroup> 
<thead> 
<tr>
	<th class="head0">Nama Agenda</th>
	<th class="head1">Tanggal Mulai</th>
	<th class="head0">Tanggal Selesai</th>
	<th class="head1">Jenis Agenda</th>
	<th class="head0">Status Agenda</th>
	<th class="head1">Hasil Liputan</th>
	<th class="head0">Aksi</th>
</tr>
</thead> 
<tfoot> 
	<tr>
	<th class="head0">Nama Agenda</th>
	<th class="head1">Tanggal Mulai</th>
	<th class="head0">Tanggal Selesai</th>
	<th class="head1">Jenis Agenda</th>
	<th class="head0">Status Agenda</th>
	<th class="head1">Hasil Liputan</th>
	<th class="head0">Aksi</th>
	</tr>
</tfoot> 
<tbody>
	<?php 
						foreach($agenda->result() as $row){			
			 		?>
	<tr class="gradeX">
	<td><?php echo $row->nama_agenda; ?></td>
	<td><?php echo date('d F Y', strtotime($row->tanggal_mulai)).' ('.$row->jam_mulai.')'; ?></td>
	<td><?php echo date('d F Y', strtotime($row->tanggal_selesai)).' ('.$row->jam_selesai.')'; ?></td>
	<td><?php echo $row->jenis_agenda; ?></td>
	<td><?php echo $row->status_agenda; ?></td>
	<td><?php if($row->link_hasil_liputan != ''){ echo $row->link_hasil_liputan.' <br/>tanggal upload :'.date('d F Y', strtotime($row->tanggal_upload)); }else{ echo '-'; } ?></td>
	<td align="center"><a href="<?php echo base_url().'index.php/agenda/detail_agenda/'.$row->id_agenda; ?>" title='Detail' class="btn btn4 btn_yellow btn_search radius50" alt="Detail"></a>
	<?php 
		$role_jabatan = $this->session->userdata('id_jabatan');
		if(($role_jabatan == '2' || $role_jabatan == '4' || $this->session->userdata('id_user') == $row->id_ketua)){
		if(($row->status_agenda != 'Finish')){
	?>
	<a href="<?php echo base_url().'index.php/agenda/edit_agenda/'.$row->id_agenda; ?>" title='Edit' class="btn btn4 btn_yellow btn_flag" alt="Edit"></a>
	<?php
		}
		if(($row->status_agenda == 'Batal' || $row->status_agenda == 'Tidak diliput')){
	?>
	<a href="<?php echo base_url().'index.php/agenda/delete_agenda/'.$row->id_agenda; ?>" title='Delete' class="btn btn4 btn_yellow btn_trash" alt="Delete" onclick="return confirm('Apa Anda yakin untuk menghapus data ini?')" ></a>
	<?php
		}}
	?>
  </td>
  </tr>
	 <?php
					  }
			  		?> 
</tbody>
</table>
<?php } ?>
<!--contenttitle--></div>
<!--contentwrapper--> </div>
<!-- centercontent -->